Ext.define('DragonApp.view.property.Attachement', {
    extend: 'Ext.panel.Panel',
    xtype: 'attachement',

    requires: [
        'Ext.Container',
        'DragonApp.view.property.MonetaryGrid',
        'DragonApp.view.property.SelectBar',
        'DragonApp.view.property.SelectedGrid'
    ],

    layout: {
        type: 'hbox',
        align: 'stretch'
    },

    dockedItems: [{
        xtype: 'property-select-bar',
        dock: 'top'
    }],

    items: [{
        xtype: 'container',
        itemId: 'property_select_container',
        flex: 1.3,
        height: 600,
        items: [{
            xtype: 'propertymonetary'
        }]
    }, {
        xtype: 'propertyselected',
        title: '已添加道具',
        flex: 1,
        height: 600,
        border: true,
        style: {
            borderColor: '#cfcfcf',
            borderStyle: 'solid'
        }
    }],

    buttons: [{
            text: '清空所选',
            iconCls: 'x-fa fa-undo',
            tooltip: '提示：清空所选道具',
            handler: 'onCancleSelect'
        },
        {
            text: '确认所选',
            iconCls: 'x-fa fa-check',
            tooltip: '提示：确认所选道具并返回发放页面',
            handler: 'onConfirmSelect'
        }
    ],

    listeners: {
        collapse: 'onAttachementCollapse',
        expand: 'onAttachementExpand'
    }
});